import 'package:flutter/material.dart';

class Test008 extends StatefulWidget {
  final String path;
  const Test008(this.path,{super.key});

  @override
  State<Test008> createState() => _Test008State();
}

class _Test008State extends State<Test008> with SingleTickerProviderStateMixin {
  late AnimationController _controller;

  @override
  void initState() {
    super.initState();
    _controller = AnimationController(vsync: this);
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("动画"),
      ),
      body: Hero(
        tag: widget.path,
        child: Image.asset(
          widget.path,
          width: 400,
          height: 160,
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {},
        child: const Icon(Icons.ads_click),
      ),
    );
  }
}
